#ifndef NETWORK_LIST_MANAGER
#define NETWORK_LIST_MANAGER

#include <windows.h> 
#include <netlistmgr.h>
#include <atlbase.h>

#include <list>

namespace Network 
{
	struct Network_
	{
		Network_():name(L""), networkId(L""), domainType(L""), category(L""), 
			connectivity(L""), description(L""), timeCreated(L""), timeConnected(L"")
		{
		}
		CComBSTR name;
		CComBSTR networkId;
		CComBSTR domainType;
		CComBSTR category;
		CComBSTR connectivity;
		CComBSTR description;
		CComBSTR timeCreated;
		CComBSTR timeConnected;
	};
	typedef std::list<Network_> NetworkList;

	class NetworkListManager 
	{
	public:

		void GetNetworks(NetworkList& networkList);

	private:
		void GetNetwork(INetwork *pNetworks, Network_& network);
		void NetworkListManager::GetCategoryString(NLM_NETWORK_CATEGORY pCategory, CComBSTR& str);
		void GetConnectivityString(NLM_CONNECTIVITY pConnectivity, CComBSTR& str);
		void GetDomainTypeString(NLM_DOMAIN_TYPE pNetworkType, CComBSTR& str);
		void GetSzGuid(GUID gdGuid, CComBSTR& str);
	};
}
#endif